#pragma once

#include <cmath>
#include <limits>

#define HINFINITY HUGE_VAL
const double X_PI = 3.1415926535897931;
const double X_E = 2.7182818284590451;

#define X_DBL_MAX std::numeric_limits<double>::max()
#define X_DBL_MIN std::numeric_limits<double>::min()
#define X_INT_MAX std::numeric_limits<int>::max()
#define X_INT_MIN std::numeric_limits<int>::min()
#define X_Fmod(x,y) std::fmod(x,y)
#define X_Fmodf(x,y) std::fmodf(x,y)
#define X_Min(x,y) std::min(x,y)
#define X_Max(x,y) std::max(x,y)
#define X_Pow(x,y) std::pow(x,y)
#define X_Sqrt(x) std::sqrt(x)
#define X_Abs(x) std::abs(x)
#define X_Sin(x) std::sin(x)
#define X_Cos(x) std::cos(x)
#define X_Tan(x) std::tan(x)
#define X_Atan(x) std::atan(x)
#define X_Atan2(x,y) std::atan2(x,y)
#define X_Acos(x) std::acos(x)
#define X_Asin(x) std::asin(x)
#define X_Floor(x) std::floor(x)
#define X_Ceil(x) std::ceil(x)
#define X_Round(x) std::round(x)
#define X_Exp(x) std::exp(x)
#define X_Log10(x) std::log10(x)
#define X_Log(x) std::log(x)
#define X_NAN (-(float)(HINFINITY * 0.0F))
#define X_IsNaN(x) std::isnan(x)
#define X_IsINF(x) std::isinf(x)
#define X_Sign(x) (x==0?0:(x>0?1:-1))
#define ISNaN(x) X_IsNaN
#define IsNaN(x) X_IsNaN
#define IsINF(x) X_IsINF

